home *** CD-ROM | disk | FTP | other *** search
- /*
- * req.c - by Markus Wandel - 1990
- * Placed in the public domain 7 Oct 1990
- * Please have the courtesy to give credit if you use this code
- * in any program.
- *
- */
- #include <exec/types.h>
- #include <intuition/intuition.h>
-
- #define BASE_EXT_DECL
- #define BASE_PAR_DECL struct IntuitionBase *IntuitionBase,
- #define BASE_PAR_DECL0 struct IntuitionBase *IntuitionBase
- #include <inline/intuition.h>
-
- /*
- * Set SysBase to a local variable, that loads directly from 4 when it
- * has to be reloaded
- */
- #define BASE_EXT_DECL
- #define BASE_NAME (*(void **)4)
- #include <inline/exec.h>
-
- int
- AutoAutoRequest(char *l1, char *l2, char *l3, char *left, char *right)
- {
- struct IntuiText line1, line2, line3, lefttext, righttext;
- struct IntuitionBase *IntuitionBase;
- int result;
-
- if (IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library",0))
- {
- line1.FrontPen = AUTOFRONTPEN;
- line1.BackPen = AUTOBACKPEN;
- line1.DrawMode = AUTODRAWMODE;
- line1.ITextFont = AUTOITEXTFONT;
- line1.NextText = 0;
- CopyMem(&line1,&lefttext,(long)sizeof(line1));
- lefttext.LeftEdge = AUTOLEFTEDGE;
- lefttext.TopEdge = AUTOTOPEDGE;
- CopyMem(&lefttext,&righttext,(long)sizeof(line1));
- line1.LeftEdge = 15;
- CopyMem(&line1,&line2,(long)sizeof(line1));
- CopyMem(&line1,&line3,(long)sizeof(line1));
- line1.NextText = &line2;
- line2.NextText = &line3;
- line1.TopEdge = 5;
- line2.TopEdge = 15;
- line3.TopEdge = 25;
-
- line1.IText = (UBYTE *) l1;
- line2.IText = (UBYTE *) l2;
- line3.IText = (UBYTE *) l3;
- lefttext.IText = (UBYTE *) left;
- righttext.IText = (UBYTE *) right;
- result = AutoRequest(IntuitionBase,0L,&line1,left?&lefttext:0L,&righttext,0L,0L,320L,72L);
- CloseLibrary(IntuitionBase);
- return result;
- }
- }
-